function proStatus(status) {
	var statustxt = "--";
	if (status == 0)
		statustxt = "待上传附件";
	if (status == 2)
		statustxt = "审核中"; // 2014-07-08
	if (status == 21)
		statustxt = "信息披露成功"; // 2014-07-08已认领审核通过
	if (status == 20)
		statustxt = "待认领"; // 2014-07-08
	if (status == 22)
		statustxt = "审核不通过"; // 2014-07-14
	if (status == 4)
		statustxt = "附件已上传";
	if (status == 10)
		statustxt = "暂存";
	// if(status==20) statustxt = "待审核";
	if (status == 30)
		statustxt = "挂牌中";
	if (status == 301)
		statustxt = "已认领";
	if (status == 300)
		statustxt = "退回";
	if (status == 40)
		statustxt = "审核中";
	if (status == 501)
		statustxt = "审核通过";
	if (status == 500)
		statustxt = "审核不通过";
	if (status == 60)
		statustxt = "挂牌中"; // 2014-07-08对接前60是挂牌
	if (status == 70)
		statustxt = "摘牌";
	if (status == 80)
		statustxt = "延牌";

	return statustxt;
}

function qzwtStatus(status) {
	var statustxt = "--";
	if (status == 0)
		statustxt = "待上传附件";
	if (status == 4)
		statustxt = "附件已上传";
	if (status == 1)
		statustxt = "待审核";
	if (status == 2)
		statustxt = "已发布";
	return statustxt;
}

function buyerStatus(status) {
	var statustxt = "--";
	if (status == -1)
		statustxt = "未认领";
	if (status == 0)
		statustxt = "暂存";
	if (status == 1)
		statustxt = "审核退回";
	if (status == 4)
		statustxt = "退出";
	if (status == 10)
		statustxt = "已提交审核";
	if (status == 13)
		statustxt = "审核通过";
	if (status == 30)
		statustxt = "受理";
	if (status == 60)
		statustxt = "受让资格已确认";
	return statustxt;
}

function catName(cid) {
	var cname = "";
	if (cid == "/jryw/qyzc/pejj")
		cname = "PE基金份额";
	if (cid == "/jryw/qyzc/swzc")
		cname = "实物资产";
	if (cid == "/jryw/qyzc/blzq")
		cname = "不良债权";
	if (cid == "/jryw/qyzc/qygq")
		cname = "企业股权";
	if (cid == "/qzwt")
		cname = "前置委托";
	if (cid == "/jryw/rzxq/xmrz")
		cname = "项目融资";
	if (cid == "/jryw/rzxq/gqrz")
		cname = "股权融资";
	if (cid == "/jryw/rzxq/zqrz")
		cname = "债权融资";

	if (cid == "/qzwt/pejj")
		cname = "PE基金份额";
	if (cid == "/qzwt/swzc")
		cname = "实物资产";
	if (cid == "/qzwt/blzq")
		cname = "不良债权";
	if (cid == "/qzwt/qygq")
		cname = "企业股权";
	if (cid == "/qzwt/xmrz")
		cname = "项目融资";
	if (cid == "/qzwt/gqrz")
		cname = "股权融资";
	if (cid == "/qzwt/zqrz")
		cname = "债权融资";

	return cname;
}

function modifyPro(proId, cid) {
	var turl = "pub.jsp?infoId=" + proId + "&catEname=" + cid;
	window.open(turl);
}

function delPro(proId, proName) {
	alert(proId + proName);
}

function pubList(catename) {
	window.location.href = "projects.jsp?catEname=" + catename;
}

function pub(cid) {
	var turl = "project.jsp?catEname=" + cid;
	window.open(turl);
}
function infoSave(formname) {
	var opurl = "http://pub.te.com/weblfow/" + "web/myint";
	$.ajax({
		type : 'POST',
		url : opurl,
		data : $('#' + formname).serialize(),
		jsonp : 'jsoncallback',
		dataType : 'json',
		success : function(data) {
			var flag = data.flag;
			var msg = data.msg;
			alert(msg);
			//opDone(flag, msg);
		},
		error : function() {
			alert("请检查服务器！----------");
		}
	});
};
/**lix信息发布页面提交**/
function pubSubmit(formname,catEname) {
	var opurl = "saveInfo.action?doCode=I0001";
	$.ajax({
		type : 'post',
		url : opurl,
		data : $('#' + formname).serializeArray(),
		dataType : 'json',
		success : function(data) {
			var flag = data.flag;
			var msg = data.msg;
			var infoId = data.str;
			alert(msg);
			openDone(flag, msg,catEname);
		},
		error : function() {
		alert("请检查服务器！");
		}
	});
};
function openDone(flag,msg,catEname){
		if('T'==flag){
			toPub('toProList',catEname);
		}
  };

/** 删除* */
function delInfo(id) {
	if (window.confirm("您确定要删除该信息吗？")) {
		$.post("info/del.srv", {
			infoId : id
		}, function(data) {
			var oTxt = jQuery.parseJSON(data);
			if (oTxt.flag == "T") {
				opDone(oTxt.flag, oTxt.msg);
			}
		});
	}
}
/**页面跳转*/
function toPub(pageKey,clName){
	var url = "sendPage.action?toPage="+pageKey;
	if("" != clName){
		url += "&catEname="+clName;
	}
	window.location=url;
}
/**议价管理页面跳转*/
function toBargain(pageKey,catEname,sqlKey){
	var url = "sendPage.action?toPage="+pageKey;
	if("" != catEname){
		url += "&catEname="+catEname;
	}
	if("" != sqlKey){
		url += "&sqlByKey="+sqlKey;
	}
	window.location=url;
	
}
/**单个项目的议价记录*/
function toProBargain(pageKey,catEname,productId){
	var url = "sendPage.action?toPage="+pageKey;
	if("" != catEname){
		url += "&catEname="+catEname;
	}
	if("" != productId){
		url += "&productId="+productId;
	}
	window.location=url;
	
}
function toUpdate(pageKey,catEname,infoId){
	var url = "sendPage.action?toPage="+pageKey;
	if("" != catName && ""!=infoId){
		url += "&catEname="+catEname+"&infoId="+infoId;
	}else{
		alert("请求地址错误！");
		alert(url);	
	}
	window.location=url;
}

function toSellerList(id){
	alert(123);
		var catEname="${catEname}";
		var url = "sendPage.action?toPage=toShowSeller&productId="+id;
		if(catEname){
			url+="&catEname="+catEname;
		}
	window.location=url;
}
	
function toWebUpdate(pageKey,catEname,infoId){
	var url = "doSendPage?toPage="+pageKey;
	if("" != catName && ""!=infoId){
		url += "&catEname="+catEname+"&infoId="+infoId;
	}else{
		alert("请求地址错误！");
		alert(url);	
	}
	window.location=url;
}
function toShowPro(pageKey,catEname,tempName){
	var url = "doSendPage?toPage="+pageKey;
	if("" != catName && ""!=tempName){
		url += "&catEname="+catEname+"&tempName="+tempName;
		//alert(url);
	}else{
		alert("请求地址错误！");
		//alert(url);	
	}
	window.location=url;
}
function toOrder(pageKey,clName){
	var url = "order.action?toPage="+pageKey;
	if("" != clName){
		url += "&doCode="+clName;
	}
	window.location=url;
}
//大于1万的以万为单位
function fromatWan(val){
	if(isNaN(val)){  
        return val;  
    }
    val= val*1;
    if(val > 10000){
    	val = val*0.0001;//10000;  
    	//v = parseFloat(v,2);//parseInt(v);  
	}
    return val.toFixed(2)+" 万";  
}
